#!/usr/bin/env python
# -*- coding:utf-8 -*- #

from django.conf.urls.defaults import patterns,include
from popcan.core import settings

login_pattern = patterns('',
    (r'^register/','popcan.views.logins.register'),
    (r'^login/','popcan.views.logins.login'),
    (r'^modify/','popcan.views.logins.modify'),
    (r'^logout/','popcan.views.logins.logout'),         
)

customer_pattern = patterns('',
    (r'^info/','popcan.views.customers.getCustomerInfo'),
    (r'^upgrade/','popcan.views.customers.upgrade'),
)

designer_pattern = patterns('',
    (r'^info/','popcan.views.designers.getDesignerInfo'),                  
)

album_pattern = patterns('',
    (r'^info/','popcan.views.albums.getAlbumInfo'),
    (r'^list/','popcan.views.albums.getAlbumList'),
    (r'^desc/','popcan.views.albums.getAlbumDesc'),
    (r'^create/','popcan.views.albums.create'),
    (r'^remove/','popcan.views.albums.remove'),
    (r'^moddesc/','popcan.views.albums.modifyDesc'),
    (r'^modname/','popcan.views.albums.modifyName'),                  
)

urlpatterns = patterns('',
    (r'^login/',include(login_pattern)),
    (r'^customer/',include(customer_pattern)),
    (r'^designer/',include(designer_pattern)),
    (r'^album/',include(album_pattern)),
    (r'^image/upload/','popcan.views.images.upload'),
    (r'^(?P<path>.*[html|js|png|css|swf|jpg|jpeg|gif])$', 'django.views.static.serve',{'document_root': settings.MEDIA_ROOT})
)
